package com.edu.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import com.alibaba.fastjson2.annotation.JSONField;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class BookEntity {
    //商品
    private int bookId;
    private String title;
    private String author;
    private String publisher;
    private double price;
    private int stock;
    private String description;
    private String coverImageUrl;

    @JSONField(serialize = false)
    private int categoryId;

    @Override
    public String toString() {
        return "BookEntity{" +
                "bookId=" + bookId +
                ", title='" + title + '\'' +
                ", author='" + author + '\'' +
                ", publisher='" + publisher + '\'' +
                ", price=" + price +
                ", stock=" + stock +
                ", description='" + description + '\'' +
                ", coverImageUrl='" + coverImageUrl + '\'' +
                ", categoryId=" + categoryId +
                '}';
    }

}